package com.erytech.linktalk.dao.ibatis;

import com.erytech.linktalk.dao.DaoFacade;
import com.erytech.linktalk.dao.MessageDao;
import com.erytech.linktalk.dao.RoomDao;
import com.erytech.linktalk.dao.SiteDao;
import com.erytech.linktalk.dao.UserDao;
import com.ibatis.dao.client.DaoManager;

public class SqlMapDaoFacade implements DaoFacade {
	
	private DaoManager daoManager;

	public SqlMapDaoFacade(DaoManager daoManager) {
		this.daoManager = daoManager;
	}

	public <T> T getDao(Class<T> daoClass) {
		return (T)daoManager.getDao(daoClass);
	}

	public MessageDao getMessageDao() {
		return getDao(MessageDao.class);
	}

	public RoomDao getRoomDao() {
		return getDao(RoomDao.class);
	}

	public SiteDao getSiteDao() {
		return getDao(SiteDao.class);
	}

	public UserDao getUserDao() {
		return getDao(UserDao.class);
	}

}
